import permission from '@/libs/permission.js' //权限插件
async function phoneLimite(phone) {
	let result = await permission.requestAndroidPermission('android.permission.CALL_PHONE')
	if (result === 1) {
		uni.makePhoneCall({
			phoneNumber: phone
		})
	} else {
		uni.showModal({
			title: '提醒',
			content: '请开启拨打电话权限',
			confirmText: '去开启',
			success(res) {
				if (res.confirm) {
					permission.gotoAppPermissionSetting()
				}
			}
		})
	}
}
export default phoneLimite